/*************************************************************************
	> File Name: oj-38.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2021年02月03日 星期三 10时32分05秒
 ************************************************************************/
#include <iostream>
#include <vector>
using namespace std;

class BigInt : public vector<int> {
public:
    BigInt(int x) { push_back(x); process_digit(); }
    BigInt(): BigInt(0) {}
    BigInt operator+(const BigInt& num) {
        BigInt ret(*this);
        ret += num;
        return ret;
    }
    void operator+=(const BigInt& num) {
        for (int i = 0; i < num.size(); ++i) {
            if (i == size()) push_back(num[i]);
            else at(i) += num[i];
        }
        process_digit();
    }
private:
    void process_digit() {
        for (int i = 0; i < size(); ++i) {
            if (at(i) < 10) continue;
            if (i + 1 == size()) push_back(0);
            at(i + 1) += at(i) / 10;
            at(i) %= 10;
        }
    }
};

ostream& operator<<(ostream& os, const BigInt& num) {
    for (int i = num.size() - 1; i >= 0; --i) {
        os << num[i];
    }
    return os;
}

void P(const BigInt& num) {
    for (int i = 0; i < num.size(); ++i) {
        cout << num[i] << ", ";
    }
    cout << endl;
}

int main() {
    BigInt f[2] = {BigInt(1), BigInt(1)};
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        f[1] += f[0];
        swap(f[1], f[0]);
    }
    cout << f[1] << endl;
    return 0;
}
